1. Field of the Invention
The present invention relates in general to voice and data communications. In particular, the invention pertains to deinterleaving and decoding symbols received over a plurality of channels.
2. Description of the Related Art
A periodic stream of symbols is received by a deinterleaver and output to a decoder which processes the received symbols. If the deinterleaver deinterleaves the n symbols received during a frame period, then n symbols need to be received by the deinterleaver before being processed by the decoder. A typical bit-reversal deinterleaver would take the n symbols and write them into a two-dimensional table, row by row, and then read the n symbols out column by column, or vice versa. As a result, if the decoder needs to operate on the deinterleaved symbols in order, then typically, the deinterleaver must wait until almost all of the n symbols have been received. Thus, effectively, a periodic stream of symbols must be buffered in one place and then provided to the decoder when the n symbols have been received.
While the decoder is processing a buffer of n symbols, more symbols are being received by the deinterleaver. Therefore, the potential exists to overwrite symbols that have not yet been processed by the decoder. Known systems solve this problem by double-buffering the received symbols.
FIG. 1 shows a first buffer 10 and a second buffer 20 in a known system for deinterleaving and decoding symbols received during frame periods, n symbols being received during each frame period. Each buffer can store up to n symbols. When the symbols are first received from a deinterleaver 15, n symbols are stored in, for example, first buffer 10. After n symbols are received, the n symbols in first buffer 10 are then processed by a decoder 30. However, while decoder 30 decodes the n symbols, a stream of symbols continues to be received by the deinterleaver. If the symbols are stored in first buffer 10 before the decoder completes processing, then the previously received symbols will be overwritten before being processed. In order to prevent this from occurring, known systems solve this problem by allocating a second buffer 20 to receive n symbols while the decoder processes the n symbols in buffer 10. Since the process of decoding is faster than the process of receiving symbols from a deinterleaver, by the time n symbols are received and stored in buffer 20, the decoder is again available and the symbols in buffer 20 can be processed by the decoder while buffer 10 is reallocated to receive another stream of n symbols.